<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./Template/templateClient.xhtml"
                xmlns:p="http://primefaces.org/ui"
                xmlns:h="http://java.sun.com/jsf/html">

    <ui:define name="content">
        <h1>#{bundle.creer_un_utilisateur}</h1>
        <h:form>
            <p:growl id="messages" />
            <p>
                <h:outputLabel value="#{bundle.login} : " />
                <p:inputText id="login" value="#{usersBean.login}"/>
            </p>

            <p>
                <h:outputLabel value="#{bundle.password} : " />
                <p:password id="password" value="#{usersBean.password}"/>
                
            </p>

            <p>
                <h:outputLabel value="#{bundle.lastName} : " />
                <p:inputText  id="nom" value="#{usersBean.lastName}"/>
            </p>

            <p>
                <h:outputLabel value="#{bundle.firstName} : " />
                <p:inputText id="prenom" value="#{usersBean.firstName}"/>
            </p>
            
            <p>
                <h:outputLabel value="#{bundle.mail} : " />
                <p:inputText id="mail" value="#{usersBean.mail}"/>
            </p>

            <p>
                <p:commandButton value="#{bundle.creer_utilisateur}" 
                                 actionListener="#{usersBean.save()}" update="messages"/>
            </p>
        </h:form>
    </ui:define>

</ui:composition>

